<template>
  <image class="image" :src=imgData[curType][curIdx] mode="widthFix"/>
</template>
<script setup>
import {onLoad} from "@dcloudio/uni-app";
import {getUrlParamsInH5, getUrlParamsInWeixin} from "@/utils/utils";
import {ref} from "vue";

let imgUrl = import.meta.env.VITE_APP_IMGURL

const curType = ref('')
const curIdx = ref(0)
const imgData = {
  0: {
    0: `${imgUrl}2024-04-16/1713232178587WechatIMG1530.jpg`,
    1: `${imgUrl}2024-04-18/1713437680353WechatIMG1859.jpg`,
    2: `${imgUrl}2024-04-18/1713437731617WechatIMG1860.jpg`,
    // 
    3: `${imgUrl}2024-07-31/1722428877524tongzhi.jpg`,
    4: `${imgUrl}2024-07-31/1722429209841image.jpg`,
    5: `${imgUrl}2024-07-31/1722429297365image.jpg`,
    6: `${imgUrl}2024-07-31/1722429446815image.jpg`,
  },
  1: {
    0: `${imgUrl}2024-07-31/1722429603527image.jpg`,
    1: `${imgUrl}2024-07-31/1722429892280image.jpg`,
    2: `${imgUrl}2024-07-31/1722429968759image.jpg`,
    3: `${imgUrl}2024-07-31/1722430364814image.jpg`,
    4: `${imgUrl}2024-04-16/1713245179374WechatIMG1538.jpg`,
    5: `${imgUrl}2024-04-19/1713489352926WechatIMG1890.jpg`,
  },
  2: {
    0: `${imgUrl}2024-04-08/1712546216401WechatIMG1018.jpg`,
    1: `${imgUrl}2024-04-19/1713489475200WechatIMG1892.jpg`,
    2: `${imgUrl}2024-07-31/1722430535479image.jpg`,
    3: `${imgUrl}2024-07-31/1722430616960image.jpg`,
    4: `${imgUrl}2024-07-31/1722430700634image.jpg`,
    5: `${imgUrl}2024-07-31/1722430788590image.jpg`,
  }
}

onLoad(() => {
  /* #ifndef MP-WEIXIN */
  curType.value = getUrlParamsInH5()?.type
  curIdx.value = getUrlParamsInH5()?.idx
  /* #endif */

  /* #ifdef MP-WEIXIN */
  curType.value = getUrlParamsInWeixin()?.type
  curIdx.value = getUrlParamsInWeixin()?.idx
  /* #endif */
})
</script>
<style lang="less">
.image {
  width: 100%;
  object-fit: cover;
}
</style>

